package com.citycloud.ccuap.tc.admin.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.citycloud.ccuap.commons.json.JSONData;
import com.citycloud.ccuap.commons.openapi.controller.base.BaseController;
import com.citycloud.ccuap.commons.sys.entity.SysParameter;
import com.citycloud.ccuap.commons.sys.parameter.IParameterService;

import io.swagger.annotations.Api;

@Api("综合参数")
@RestController("yqParameterController")
@RequestMapping("/v1/yq/parameter")
public class ParameterController extends BaseController {
	@Autowired
    private IParameterService parameterService;

    @Value("${tc.authorizationProjectId}")
	private Integer authorizationCode;

    
	@GetMapping("/platform_sites")
	public JSONData getParameterCode(){
        List<SysParameter> parameters = parameterService.findByCodeValue(authorizationCode);

        return new JSONData(parameters);
	}


}